﻿Public Class F04_V_anverso_

 
    Private Sub txtdominio_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtdominio.TextChanged

    End Sub

    Private Sub btnReverso_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReverso.Click
        Me.Close()
        F04_V_reverso_.Show()
    End Sub

    Private Sub btnguardar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnguardar.Click
        If (Len(txtnumform.Text) = 0) Then
            MsgBox("EL Número de formulario es un campo obligatorio", MsgBoxStyle.Exclamation)
            txtnumform.Focus()
            Exit Sub
        End If
        Dim oF04VANegocios As New Negocios.NF04_VA
        Dim oF04VA As New Entidades.EF04Vehiculos
        oF04VA.numformu = UCase(txtnumform.Text)
        oF04VA.domini = UCase(txtdominio.Text)
        oF04VA.xuno = UCase(txtX1.Text)
        oF04VA.descripcionn = UCase(txtdescripcion.Text)
        oF04VA.xdos = UCase(txtX2.Text)
        oF04VA.xtres = UCase(txtX3.Text)
        oF04VA.xcuatro = UCase(txtX4.Text)
        oF04VA.xcinco = UCase(txtX5.Text)
        oF04VA.xseis = UCase(txtX6.Text)
        oF04VA.xsiete = UCase(txtX7.Text)
        oF04VA.xocho = UCase(txtX8.Text)
        oF04VA.xnueve = UCase(txtX9.Text)
        oF04VA.motorbaj = UCase(txtmotorbaja.Text)
        oF04VA.xdiez = UCase(txtX10.Text)
        oF04VA.xonce = UCase(txtX11.Text)
        oF04VA.xdoce = UCase(txtX12.Text)
        oF04VA.xtrece = UCase(txtX13.Text)
        oF04VA.xcatorce = UCase(txtX14.Text)
        oF04VA.marcanuevomotorr = UCase(txtmarcanuevomotor.Text)
        oF04VA.numnuevomotorr = UCase(txtnumnuevomotor.Text)
        oF04VA.xquince = UCase(txtX15.Text)
        oF04VA.callee = UCase(txtcalle.Text)
        oF04VA.numeroo = UCase(txtnumero.Text)
        oF04VA.pisoo = UCase(txtpiso.Text)
        oF04VA.dptoo = UCase(txtdpto.Text)
        oF04VA.codposta = UCase(txtcodpostal.Text)
        oF04VA.localida = UCase(txtlocalidad.Text)
        oF04VA.partdpt = UCase(txtpartdpto.Text)
        oF04VA.provinci = UCase(txtprovincia.Text)
        oF04VA.optasii = UCase(txtoptasi.Text)
        oF04VA.optanoo = UCase(txtoptano.Text)
        oF04VA.codregistr = UCase(txtcodregistro.Text)
        oF04VA.chapaa = UCase(txtchapa.Text)
        oF04VA.marcaa = UCase(txtmarca.Text)
        oF04VA.tipoo = UCase(txttipo.Text)
        oF04VA.modeloo = UCase(txtmodelo.Text)
        oF04VA.modeloo = UCase(txtmodelo.Text)
        oF04VA.marcamoto = UCase(txtmarcamotor.Text)
        oF04VA.nummoto = UCase(txtnummotor.Text)
        oF04VA.marcachasi = UCase(txtmarcachasis.Text)
        oF04VA.numchasi = UCase(txtnumchasis.Text)
        oF04VA.lugarfech = UCase(txtlugarfecha.Text)
        oF04VA.fechains1 = UCase(txtfechainsc1.Text)
        oF04VA.import1 = UCase(txtimporte1.Text)
        oF04VA.acreedo1 = UCase(txtacreedor1.Text)
        oF04VA.fechains2 = UCase(txtfechainsc2.Text)
        oF04VA.import2 = UCase(txtimporte2.Text)
        oF04VA.acreedo2 = UCase(txtacreedor2.Text)

        Try
            If oF04VANegocios.guardarF04VA(oF04VA) Then
                MsgBox("La carga ha sido exitosa", MsgBoxStyle.MsgBoxSetForeground, "Información")
            End If
        Catch ex As Exception
            MsgBox("Carga fallida. " + ex.Message, MsgBoxStyle.MsgBoxSetForeground, "Información")
        End Try
    End Sub

    Private Sub btnEditarAnverso_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEditarAnverso.Click
        If (Len(txtnumform.Text) = 0) Then
            MsgBox("EL Número de formulario es un campo obligatorio", MsgBoxStyle.Exclamation)
            txtnumform.Focus()
            Exit Sub
        End If
        Dim oF04VANegocios As New Negocios.NF04_VA
        Dim oF04VA As New Entidades.EF04Vehiculos
        oF04VA.numformu = UCase(txtnumform.Text)
        oF04VA.domini = UCase(txtdominio.Text)
        oF04VA.xuno = UCase(txtX1.Text)
        oF04VA.descripcionn = UCase(txtdescripcion.Text)
        oF04VA.xdos = UCase(txtX2.Text)
        oF04VA.xtres = UCase(txtX3.Text)
        oF04VA.xcuatro = UCase(txtX4.Text)
        oF04VA.xcinco = UCase(txtX5.Text)
        oF04VA.xseis = UCase(txtX6.Text)
        oF04VA.xsiete = UCase(txtX7.Text)
        oF04VA.xocho = UCase(txtX8.Text)
        oF04VA.xnueve = UCase(txtX9.Text)
        oF04VA.motorbaj = UCase(txtmotorbaja.Text)
        oF04VA.xdiez = UCase(txtX10.Text)
        oF04VA.xonce = UCase(txtX11.Text)
        oF04VA.xdoce = UCase(txtX12.Text)
        oF04VA.xtrece = UCase(txtX13.Text)
        oF04VA.xcatorce = UCase(txtX14.Text)
        oF04VA.marcanuevomotorr = UCase(txtmarcanuevomotor.Text)
        oF04VA.numnuevomotorr = UCase(txtnumnuevomotor.Text)
        oF04VA.xquince = UCase(txtX15.Text)
        oF04VA.callee = UCase(txtcalle.Text)
        oF04VA.numeroo = UCase(txtnumero.Text)
        oF04VA.pisoo = UCase(txtpiso.Text)
        oF04VA.dptoo = UCase(txtdpto.Text)
        oF04VA.codposta = UCase(txtcodpostal.Text)
        oF04VA.localida = UCase(txtlocalidad.Text)
        oF04VA.partdpt = UCase(txtpartdpto.Text)
        oF04VA.provinci = UCase(txtprovincia.Text)
        oF04VA.optasii = UCase(txtoptasi.Text)
        oF04VA.optanoo = UCase(txtoptano.Text)
        oF04VA.codregistr = UCase(txtcodregistro.Text)
        oF04VA.chapaa = UCase(txtchapa.Text)
        oF04VA.marcaa = UCase(txtmarca.Text)
        oF04VA.tipoo = UCase(txttipo.Text)
        oF04VA.modeloo = UCase(txtmodelo.Text)
        oF04VA.modeloo = UCase(txtmodelo.Text)
        oF04VA.marcamoto = UCase(txtmarcamotor.Text)
        oF04VA.nummoto = UCase(txtnummotor.Text)
        oF04VA.marcachasi = UCase(txtmarcachasis.Text)
        oF04VA.numchasi = UCase(txtnumchasis.Text)
        oF04VA.lugarfech = UCase(txtlugarfecha.Text)
        oF04VA.fechains1 = UCase(txtfechainsc1.Text)
        oF04VA.import1 = UCase(txtimporte1.Text)
        oF04VA.acreedo1 = UCase(txtacreedor1.Text)
        oF04VA.fechains2 = UCase(txtfechainsc2.Text)
        oF04VA.import2 = UCase(txtimporte2.Text)
        oF04VA.acreedo2 = UCase(txtacreedor2.Text)

        Try
            If oF04VANegocios.editarF04VA(oF04VA) Then
                MsgBox("La Edición ha sido exitosa", MsgBoxStyle.MsgBoxSetForeground, "Información")
            End If
        Catch ex As Exception
            MsgBox("Edición fallida. " + ex.Message, MsgBoxStyle.MsgBoxSetForeground, "Información")
        End Try
    End Sub

    Private Sub btnNuevo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNuevo.Click
        txtnumform.Text = ""
        txtdominio.Text = ""
        txtX1.Text = ""
        txtX2.Text = ""
        txtX3.Text = ""
        txtX4.Text = ""
        txtX5.Text = ""
        txtX6.Text = ""
        txtX7.Text = ""
        txtX8.Text = ""
        txtX9.Text = ""
        txtmotorbaja.Text = ""
        txtX10.Text = ""
        txtX11.Text = ""
        txtX12.Text = ""
        txtX13.Text = ""
        txtX14.Text = ""
        txtmarcanuevomotor.Text = ""
        txtX15.Text = ""
        txtcalle.Text = ""
        txtnumero.Text = ""
        txtpiso.Text = ""
        txtdpto.Text = ""
        txtcodpostal.Text = ""
        txtlocalidad.Text = ""
        txtpartdpto.Text = ""
        txtprovincia.Text = ""
        txtoptasi.Text = ""
        txtoptano.Text = ""
        txtcodregistro.Text = ""
        txtchapa.Text = ""
        txtmarca.Text = ""
        txttipo.Text = ""
        txtmodelo.Text = ""
        txtmarcamotor.Text = ""
        txtnummotor.Text = ""
        txtmarcachasis.Text = ""
        txtlugarfecha.Text = ""
        txtfechainsc1.Text = ""
        txtimporte1.Text = ""
        txtacreedor1.Text = ""
        txtfechainsc2.Text = ""
        txtimporte2.Text = ""
        txtacreedor2.Text = ""

    End Sub

    Private Sub btnEditarReverso_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEditarReverso.Click
        F04_V_reverso_.Show()
    End Sub

    Private Sub btnsalir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsalir.Click
        Me.Close()
    End Sub

    Private Sub btnF01V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01V.Click
        F01_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF01M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01M.Click
        F01_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF01I_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01I.Click
        F01_VImp_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF02V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF02V.Click
        F02_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF02M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF02M.Click
        F02_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click
        F04_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF08V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF08V.Click
        F08_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF08M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF08M.Click
        F08_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF11V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF11V.Click
        F11_V_anverso_.Show()
        Me.Close()

    End Sub

    Private Sub btnF11M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF11M.Click
        F11_M_anverso_.Show()
        Me.Close()

    End Sub

    Private Sub btnF12V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF12V.Click
        F12_V.Show()
        Me.Close()
    End Sub

    Private Sub btnF12M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF12M.Click
        F12_M.Show()
        Me.Close()
    End Sub

    Private Sub btnF99_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF99.Click
        F99.Show()
        Me.Close()
    End Sub

    Private Sub btnF59M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF59M.Click
        F59_M.Show()
        Me.Close()
    End Sub

    Private Sub btnFR00_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFR00.Click
        F_R00.Show()
        Me.Close()
    End Sub
End Class
